package com.demo.enums;

/**
 * 查询原因枚举类
 */
public enum QueryReasonEnum {

    DHGL("01", "贷后管理"),
    DKSP("02", "贷款审批"),
    XYKSP("03", "信用卡审批"),
    DBSC("08", "担保资格审查"),
    SFDC("09", "司法调查"),
    GJJCX("16", "公积金提取复核查询"),
    GZKH("18", "股指期货开户"),
    TYSC("19", "特约商户实名审查"),
    BQSC("20", "保前审查"),
    BHGL("21", "保后管理"),
    FRSC("22", "法人代表、负责人、高管等资信审查"),
    KHSC("23", "客户准入资格审查"),
    RZSP("24", "融资审批"),
    ZXSP("25", "资信审查"),
    EDSP("26", "额度审批");


    private String code;
    private String message;

    /**
     * 取得枚举对象值
     *
     * @return 枚举对象值
     */
    public String getCode() {
        return this.code;
    }

    /**
     * 取得内容
     *
     * @return 内容
     */
    public String getMessage() {
        return this.message;
    }


    QueryReasonEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public static String getMessage(String code) {
        if (QueryReasonEnum.values() != null) {
            for (QueryReasonEnum c : QueryReasonEnum.values()) {
                if (c.code.equals(code)) {
                    return c.message;
                }
            }
        }
        return null;
    }

    public boolean eq(String code) {
        return this.code.equals(code);
    }
}
